home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************\
- * *
- * ocx96.h - OLE Controls 96 definitions *
- * *
- * OLE Version 2.0 *
- * *
- * Copyright (c) 1992-1996, Microsoft Corp. All rights reserved. *
- * *
- \*****************************************************************************/
-
- #ifndef _OCX96_H_
- #define _OCX96_H_
-
- /****** OCX96 GUIDs *********************************************************/
-
- #ifndef INITGUID
- #include "ocx96guid.h"
- #endif
-
-
- /////////////////////////////////////////////////////////////////////////////
- // Typedefs for interfaces
-
- #ifdef __cplusplus
- interface IAdviseSinkEx;
- interface IOleInPlaceObjectWindowless;
- interface IOleInPlaceSiteEx;
- interface IOleInPlaceSiteWindowless;
- #else
- typedef interface IAdviseSinkEx IAdviseSinkEx;
- typedef interface IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless;
- typedef interface IOleInPlaceSiteEx IOleInPlaceSiteEx;
- typedef interface IOleInPlaceSiteWindowless IOleInPlaceSiteWindowless;
- #endif
- typedef IAdviseSinkEx * LPADVISESINKEX;
- typedef IOleInPlaceObjectWindowless * LPOLEINPLACEOBJECTWINDOWLESS;
- typedef IOleInPlaceSiteEx * LPOLEINPLACESITEEX;
- typedef IOleInPlaceSiteWindowless * LPOLEINPLACESITEWINDOWLESS;
-
-
- /////////////////////////////////////////////////////////////////////////////
- // IAdviseSinkEx interface
-
- #undef INTERFACE
- #define INTERFACE IAdviseSinkEx
-
- DECLARE_INTERFACE_(IAdviseSinkEx, IAdviseSink)
- {
- BEGIN_INTERFACE
- // *** IUnknown methods ***
- STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- // *** IAdviseSink methods ***
- STDMETHOD_(void,OnDataChange)(THIS_ FORMATETC * pFormatetc, STGMEDIUM * pStgmed) PURE;
- STDMETHOD_(void,OnViewChange)(THIS_ unsigned long dwAspect, long lindex) PURE;
- STDMETHOD_(void,OnRename)(THIS_ LPMONIKER pmk) PURE;
- STDMETHOD_(void,OnSave)(THIS) PURE;
- STDMETHOD_(void,OnClose)(THIS) PURE;
-
- // *** IAdviseSinkEx methods ***
- STDMETHOD_(void,OnViewStatusChange)(THIS_ DWORD dwViewStatus) PURE;
- };
-
-
- /////////////////////////////////////////////////////////////////////////////
- // IOleInPlaceObjectWindowless interface
-
- #undef INTERFACE
- #define INTERFACE IOleInPlaceObjectWindowless
-
- DECLARE_INTERFACE_(IOleInPlaceObjectWindowless, IOleInPlaceObject)
- {
- BEGIN_INTERFACE
- // *** IUnknown methods ***
- STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- // *** IOleWindow methods ***
- STDMETHOD(GetWindow) (THIS_ WindowPtr * ppWnd) PURE;
- STDMETHOD(ContextSensitiveHelp) (THIS_ unsigned long fEnterMode) PURE;
-
- // *** IOleInPlaceObject methods ***
- STDMETHOD(InPlaceDeactivate) (THIS) PURE;
- STDMETHOD(UIDeactivate) (THIS) PURE;
- STDMETHOD(SetObjectRects) (THIS_ LPCRECT lprcPosRect,
- RgnHandle clipRgn, // cliping area within containing window
- RgnHandle frameRgn, // entire structure rgn of containing window
- RgnHandle cliRgn // union of all structure rgns of all container app windows
- ) PURE;
- STDMETHOD(ReactivateAndUndo) (THIS) PURE;
-
- // *** IOleInPlaceObjectWindowless methods ***
- STDMETHOD(OnEvent)(THIS_ EventRecord* pEvent, LRESULT *plResult) PURE;
- STDMETHOD(GetDropTarget)(THIS_ LPDROPTARGET *ppDropTarget) PURE;
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // ACTIVATEFLAGS enumeration
-
- typedef enum _ACTIVATEFLAGS
- {
- ACTIVATE_WINDOWLESS = 1
- } ACTIVATEFLAGS;
-
- /////////////////////////////////////////////////////////////////////////////
- // IOleInPlaceSiteEx interface
-
- #undef INTERFACE
- #define INTERFACE IOleInPlaceSiteEx
-
- DECLARE_INTERFACE_(IOleInPlaceSiteEx, IOleInPlaceSite)
- {
- BEGIN_INTERFACE
- // *** IUnknown methods ***
- STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- // *** IOleWindow methods ***
- STDMETHOD(GetWindow) (THIS_ WindowPtr * ppWnd) PURE;
- STDMETHOD(ContextSensitiveHelp) (THIS_ unsigned long fEnterMode) PURE;
-
- // *** IOleInPlaceSite methods ***
- STDMETHOD(CanInPlaceActivate) (THIS) PURE;
- STDMETHOD(OnInPlaceActivate) (THIS) PURE;
- STDMETHOD(OnUIActivate) (THIS) PURE;
- STDMETHOD(OnUIVisible) (THIS_ unsigned long fVisible) PURE; // true if visibile
-
- STDMETHOD(GetObjectRects) (THIS_
- Rect * lprcPosRect,
- // server allocs, container fills, server frees
- RgnHandle clipRgn, // defines vis rgn
- RgnHandle frameRgn, // containing window strucRgn
- RgnHandle cliRgn // all container app strucRgns
- ) PURE;
- STDMETHOD(GetWindowContext) (THIS_
- LPLPOLEINPLACEFRAME lplpFrame,
- LPLPOLEINPLACEUIWINDOW lplpDoc,
- //WindowPtr *ppWindow,
- Rect *lprcPosRect,
- // server allocs, container fills, server frees
- RgnHandle clipRgn, // defines vis rgn
- RgnHandle frameRgn, // containing window strucRgn
- RgnHandle cliRgn, // all container app strucRgns
- LPOLEINPLACEFRAMEINFO lpFrameInfo) PURE;
- STDMETHOD(Scroll) (THIS_ long scrollExtent) PURE;
- STDMETHOD(OnUIDeactivate) (THIS_ unsigned long fUndoable) PURE;
- STDMETHOD(OnInPlaceDeactivate) (THIS) PURE;
- STDMETHOD(DiscardUndoState) (THIS) PURE;
- STDMETHOD(DeactivateAndUndo) (THIS) PURE;
- STDMETHOD(OnPosRectChange) (THIS_ LPCRECT lprcPosRect) PURE;
-
- // *** IOleInPlaceSiteEx methods ***
- STDMETHOD(OnInPlaceActivateEx)(THIS_ unsigned long *pfNoRedraw, DWORD dwFlags) PURE;
- STDMETHOD(OnInPlaceDeactivateEx)(THIS_ unsigned long fNoRedraw) PURE;
- STDMETHOD(RequestUIActivate)(THIS) PURE;
- };
-
-
- /////////////////////////////////////////////////////////////////////////////
- // IOleInPlaceSiteWindowless interface
-
- #undef INTERFACE
- #define INTERFACE IOleInPlaceSiteWindowless
-
- DECLARE_INTERFACE_(IOleInPlaceSiteWindowless, IOleInPlaceSiteEx)
- {
- BEGIN_INTERFACE
- // *** IUnknown methods ***
- STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- // *** IOleWindow methods ***
- STDMETHOD(GetWindow) (THIS_ WindowPtr * ppWnd) PURE;
- STDMETHOD(ContextSensitiveHelp) (THIS_ unsigned long fEnterMode) PURE;
-
- // *** IOleInPlaceSite methods ***
- STDMETHOD(CanInPlaceActivate) (THIS) PURE;
- STDMETHOD(OnInPlaceActivate) (THIS) PURE;
- STDMETHOD(OnUIActivate) (THIS) PURE;
- STDMETHOD(OnUIVisible) (THIS_ unsigned long fVisible) PURE; // true if visibile
-
- STDMETHOD(GetObjectRects) (THIS_
- Rect * lprcPosRect,
- // server allocs, container fills, server frees
- RgnHandle clipRgn, // defines vis rgn
- RgnHandle frameRgn, // containing window strucRgn
- RgnHandle cliRgn // all container app strucRgns
- ) PURE;
- STDMETHOD(GetWindowContext) (THIS_
- LPLPOLEINPLACEFRAME lplpFrame,
- LPLPOLEINPLACEUIWINDOW lplpDoc,
- //WindowPtr *ppWindow,
- Rect *lprcPosRect,
- // server allocs, container fills, server frees
- RgnHandle clipRgn, // defines vis rgn
- RgnHandle frameRgn, // containing window strucRgn
- RgnHandle cliRgn, // all container app strucRgns
- LPOLEINPLACEFRAMEINFO lpFrameInfo) PURE;
- STDMETHOD(Scroll) (THIS_ long scrollExtent) PURE;
- STDMETHOD(OnUIDeactivate) (THIS_ unsigned long fUndoable) PURE;
- STDMETHOD(OnInPlaceDeactivate) (THIS) PURE;
- STDMETHOD(DiscardUndoState) (THIS) PURE;
- STDMETHOD(DeactivateAndUndo) (THIS) PURE;
- STDMETHOD(OnPosRectChange) (THIS_ LPCRECT lprcPosRect) PURE;
-
- // *** IOleInPlaceSiteEx methods ***
- STDMETHOD(OnInPlaceActivateEx)(THIS_ unsigned long *pfNoRedraw, DWORD dwFlags) PURE;
- STDMETHOD(OnInPlaceDeactivateEx)(THIS_ unsigned long fNoRedraw) PURE;
- STDMETHOD(RequestUIActivate)(THIS) PURE;
-
- // *** IOleInPlaceSiteWindowless methods ***
- STDMETHOD(CanWindowlessActivate)(THIS) PURE;
- STDMETHOD(GetCapture)(THIS) PURE;
- STDMETHOD(SetCapture)(THIS_ unsigned long fCapture) PURE;
- STDMETHOD(GetFocus)(THIS) PURE;
- STDMETHOD(SetFocus)(THIS_ unsigned long fFocus) PURE;
- STDMETHOD(AcquireGrafPort)(THIS_ LPCRECT prc, DWORD grfFlags, GrafPtr *pGrafPtr) PURE;
- STDMETHOD(ReleaseGrafPort)(THIS_ GrafPtr pGrafPort) PURE;
- STDMETHOD(InvalidateRect)(THIS_ LPCRECT prc, unsigned long fErase) PURE;
- STDMETHOD(InvalidateRgn)(THIS_ RgnHandle hRgn, unsigned long fErase) PURE;
- STDMETHOD(ScrollRect)(THIS_ int dx, int dy, LPCRECT prcScroll, LPCRECT prcClip) PURE;
- STDMETHOD(AdjustRect)(THIS_ LPCRECT prc) PURE;
- STDMETHOD(OnDefaultEvent)(THIS_ EventRecord* pEvent, LRESULT *plResult) PURE;
- };
-
-
- #if 0
-
- /*
- * Key State Masks for Mouse Messages
- */
- #ifndef _WIN32
- #define MK_LBUTTON 0x0001
- #define MK_RBUTTON 0x0002
- #define MK_SHIFT 0x0004
- #define MK_CONTROL 0x0008
- #define MK_MBUTTON 0x0010
- #define MK_COMMAND 0x8000
- #define MK_OPTION 0x4000
- #define MK_FGSWITCH 0x2000
- #endif
-
- /*
- * Virtual Keys, Standard Set
- */
- #ifndef _WIN32
- #define VK_LBUTTON 0x01
- #define VK_RBUTTON 0x02
- #define VK_CANCEL 0x03
- #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
-
- #define VK_BACK 0x08
- #define VK_TAB 0x09
-
- #define VK_CLEAR 0x0C
- #define VK_RETURN 0x0D
-
- #define VK_SHIFT 0x10
- #define VK_CONTROL 0x11
- #define VK_MENU 0x12
- #define VK_PAUSE 0x13
- #define VK_CAPITAL 0x14
-
- #define VK_ESCAPE 0x1B
-
- #define VK_SPACE 0x20
- #define VK_PRIOR 0x21
- #define VK_NEXT 0x22
- #define VK_END 0x23
- #define VK_HOME 0x24
- #define VK_LEFT 0x25
- #define VK_UP 0x26
- #define VK_RIGHT 0x27
- #define VK_DOWN 0x28
- #define VK_SELECT 0x29
- #define VK_PRINT 0x2A
- #define VK_EXECUTE 0x2B
- #define VK_SNAPSHOT 0x2C
- #define VK_INSERT 0x2D
- #define VK_DELETE 0x2E
- #define VK_HELP 0x2F
-
- /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
- /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
-
- #define VK_LWIN 0x5B
- #define VK_RWIN 0x5C
- #define VK_APPS 0x5D
-
- #define VK_NUMPAD0 0x60
- #define VK_NUMPAD1 0x61
- #define VK_NUMPAD2 0x62
- #define VK_NUMPAD3 0x63
- #define VK_NUMPAD4 0x64
- #define VK_NUMPAD5 0x65
- #define VK_NUMPAD6 0x66
- #define VK_NUMPAD7 0x67
- #define VK_NUMPAD8 0x68
- #define VK_NUMPAD9 0x69
- #define VK_MULTIPLY 0x6A
- #define VK_ADD 0x6B
- #define VK_SEPARATOR 0x6C
- #define VK_SUBTRACT 0x6D
- #define VK_DECIMAL 0x6E
- #define VK_DIVIDE 0x6F
- #define VK_F1 0x70
- #define VK_F2 0x71
- #define VK_F3 0x72
- #define VK_F4 0x73
- #define VK_F5 0x74
- #define VK_F6 0x75
- #define VK_F7 0x76
- #define VK_F8 0x77
- #define VK_F9 0x78
- #define VK_F10 0x79
- #define VK_F11 0x7A
- #define VK_F12 0x7B
- #define VK_F13 0x7C
- #define VK_F14 0x7D
- #define VK_F15 0x7E
- #define VK_F16 0x7F
- #define VK_F17 0x80
- #define VK_F18 0x81
- #define VK_F19 0x82
- #define VK_F20 0x83
- #define VK_F21 0x84
- #define VK_F22 0x85
- #define VK_F23 0x86
- #define VK_F24 0x87
-
- #define VK_NUMLOCK 0x90
- #define VK_SCROLL 0x91
-
- /*
- * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
- * Used only as parameters to GetAsyncKeyState() and GetKeyState().
- * No other API or message will distinguish left and right keys in this way.
- */
- #define VK_LSHIFT 0xA0
- #define VK_RSHIFT 0xA1
- #define VK_LCONTROL 0xA2
- #define VK_RCONTROL 0xA3
- #define VK_LMENU 0xA4
- #define VK_RMENU 0xA5
-
- #define VK_PROCESSKEY 0xE5
-
- #define VK_ATTN 0xF6
- #define VK_CRSEL 0xF7
- #define VK_EXSEL 0xF8
- #define VK_EREOF 0xF9
- #define VK_PLAY 0xFA
- #define VK_ZOOM 0xFB
- #define VK_NONAME 0xFC
- #define VK_PA1 0xFD
- #define VK_OEM_CLEAR 0xFE
- #endif
-
- /*
- * Window Messages
- */
- #ifndef _WIN32
- #define WM_NULL 0x0000
- #define WM_SETCURSOR 0x0020
- #define WM_KEYFIRST 0x0100
- #define WM_KEYDOWN 0x0100
- #define WM_KEYUP 0x0101
- #define WM_CHAR 0x0102
- #define WM_DEADCHAR 0x0103
- #define WM_SYSKEYDOWN 0x0104
- #define WM_SYSKEYUP 0x0105
- #define WM_SYSCHAR 0x0106
- #define WM_SYSDEADCHAR 0x0107
- #define WM_KEYLAST 0x0108
- #define WM_MOUSEFIRST 0x0200
- #define WM_MOUSEMOVE 0x0200
- #define WM_LBUTTONDOWN 0x0201
- #define WM_LBUTTONUP 0x0202
- #define WM_LBUTTONDBLCLK 0x0203
- #define WM_MOUSELAST 0x0209
- #endif
-
- #endif
-
- #endif // _OCX96_H_
-